<%@page import="helpers.ImageHelper"%>
<%@page import="models.UserModel"%>
<%@page import="java.util.Map"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="helpers.DateHelper"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%@page import="models.NewsModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
ArrayList<NewsModel> list_news = (ArrayList<NewsModel>) request.getAttribute("list_news");
Map<String, UserModel> users = (Map<String, UserModel>) request.getAttribute("users");
%>


							<% for (int i = 0; i < list_news.size(); i++) { %>
							<li>
								<div class="news-item">
									<div class="thumb right">
										<a href="/view/<%=list_news.get(i).getId() %>/<%=list_news.get(i).getAlias() %>" alt="" width="60" height="60"><img width="60" height="60" src="<%=ImageHelper.getSrcFirstImage(list_news.get(i).getDescription()) %>"></a>
									</div>
									<div class="inner-news-item">
										<h2>
											<a href="/goto?url=<%=URLEncoder.encode(list_news.get(i).getUrl())%>"><%=list_news.get(i).getTitle() %></a>
											<span class="desc"><%//=list_news.get(i).getDescription()%></span>
										</h2>
										<div class="info">
											<span class="user-info"> 
												<a title="#" href="#"><img width="15" height="15" src="http://linkhay2.vcmedia.vn/thumbs/avatars/user_uploaded/Hungnguyen140219_15.jpg"><strong><%=users.get(list_news.get(i).getCreator()) != null ? users.get(list_news.get(i).getCreator()).getFullname() : ""   %></strong></a> submit
											</span>
											<span class="separator">-</span>
											<span class="Category">
												<a title="" href="#"><%=list_news.get(i).getCategory() %></a>
											</span>
											<span class="separator">-</span>
											<span class="source"><a href="#" target="_blank" class="link"><%=UrlHelper.fomatDomains(list_news.get(i).getUrl()) %></a></span>
										</div>
										<div class="info">
											<a href="#" class="timeago" title="<%=DateHelper.getStringFromDate(list_news.get(i).getCreated(), "yyyy-MM-dd HH:mm:ss")%>"></a>
											<!-- 
											<a href="#" title="" class="comment-count">5 bÃ¬nh luáº­n</a>
											 -->
										</div>
									</div>
								</div>
							</li>
							<% } %>